'''
    while 循环
    for 循环

    break :终止循环
    continue： 跳过当前循环继续下次循环
    return: 也可以终止循环
'''

i = 1
while i <=100:
    print("我错了 ，我一定好好学习")
    i = i + 1

# 打印九行九列矩形
j = 1
while j <=9:
    m = 1
    while m<=j:
        print("%d*%d=%d "%(j,m,j*m),end="")
        m+=1
    print("")
    j+=1

resultSum = 0
i = 1
while i<=100:
    if i % 2 == 0:
        resultSum += i
    i+=1
print(resultSum)

# 遍历容器 像字符串 列表 集合...
str1 = "hello everybody"
alist = [10,2,34,3,43,43,43,54,5646,4765,756,86787]
# 直接遍历对象本身
for s in str1:
    print(s)

for a in alist:
    print(a)

# 指定区间遍历
for i in range(0,10):
    print(i)

for i in range(0,10,2):
    print(i)

for i in range(10,0,-1):
    print(i)

for i in range(0,len(str1)):
    print(i)
    print(str1[i])

resultSum = 0
for i in range(1,101):
    if i % 2 != 0:
        resultSum+=i

print(resultSum)

for i in range(1,10):
    for j in range(1,i+1):
        print("%d * %d = %d "%(i,j,i*j),end="")
    print("")


while True:
    n = int(input("人工服务0 查询话费 1 查询流量2 充值3 挂机 4"))
    if n == 0:
        print("恒高兴为您服务")
    elif n == 1:
        print("您当前余额99元")
    elif n == 2:
        print("您当前流量20G")
    elif n == 3:
        print("请输入充值金额 ...")
    elif n == 4:
        print("下次再见")
        break
    else:
        print("您输入有误")